/*
 * Copyright (C), 2014-2015, 杭州小卡科技有限公司
 * FileName: InsEnum.java
 * Author:   muxing
 * Date:    2015/10/19 16:24
 * Description:
 */
package com.xiaoka.ins.corp.api.cicp.dto;

/**
 * InsEnum
 *
 * @author muxing
 * @date 2015/10/19
 */
public enum CicpEnum {
	FUEL_TYPE("0", "汽油"), // 能源种类 ,默认汽油
	// CERTIFICATE_TYPE; // 车辆来历凭证种类
	C_NEW_VHL("0", "否"), // 新车标志：1-是；0-否 ,默认否
	T_YS_FLAG("0", "否"), // 是否约省:1-是；0-否,默认否
	C_OFFER_PLAN("C", "客户版"); // 报价方案：展业版B 客户版C 默认C，APP专用

	private String code;

	public String getCode() {
		return code;
	}

	private String name;

	public String getName() {
		return name;
	}

	CicpEnum(String code, String name) {
		this.code = code;
		this.name = name;
	}

	/**
	 * 业务返回码
	 */
	public enum RESULTCODE {
		SUSSCESS("0000", "交易成功"),
		DataCheckFail("0001", "数据校验失败"),
		ServiceFail("0002", "服务异常"),
		PutInsFail("0003", "投保处理失败"),
		AcceptInsFail("0004", "承保处理失败"),
		PolicyCheckFail("0005", "政策验证失败");
		private String code;

		public String getCode() {
			return code;
		}

		private String name;

		public String getName() {
			return name;
		}

		RESULTCODE(String code, String name) {
			this.code = code;
			this.name = name;
		}
	}

	/**
	 * 交易码类型
	 */
	public enum TRANSRNO {
		// T1030("1030", "基本信息录入"),//接口暂不使用
		T1031("1031", "车辆车型查询"),
		T1032("1032", "车险承保方案信息"),
		T1033("1033", "车险保费试算"),
		T1036("1036", "投保信息校验"),
		T1037("1037", "车险投保确认"),
		T1038("1038", "申请购买"),
		T1039("1039", "支付回调通知"),
		T1040("1040", "保单回调通知"),
		// T1041("1041", "投保信息返回"),//接口暂不使用
		T1042("1042", "无线POS缴费序号查询");
		// T1043("1043", "续保"),//接口暂不使用

		private String code;

		public String getCode() {
			return code;
		}

		private String name;

		public String getName() {
			return name;
		}

		TRANSRNO(String code, String name) {
			this.code = code;
			this.name = name;
		}
	}

	/**
	 * 业务类型
	 */
	public enum BUSINESS_CODE {
		Commercial("1", "11", "商业险"),
		Traff("0", "12", "交强险"),
		TraffAndCommercial("2", "13", "交强+商业");

		private String type;

		public String getType() {
			return type;
		}

		private String code;

		public String getCode() {
			return code;
		}

		private String name;

		public String getName() {
			return name;
		}

		BUSINESS_CODE(String type, String code, String name) {
			this.type = type;
			this.code = code;
			this.name = name;
		}

		public static BUSINESS_CODE parseType(String type) {
			if (type == null || type.equals("")) {
				return null;
			}
			for (BUSINESS_CODE businessCode : values()) {
				if (businessCode.type.equals(type))
					return businessCode;
			}
			return null;
		}
	}

	/**
	 * 缴费方式
	 */
	public enum PAYMENT_TYPE {
		xianShang("01", "网上支付")
		, xianXIA("02", "线下支付");
		private String code;

		public String getCode() {
			return code;
		}

		private String name;

		public String getName() {
			return name;
		}

		PAYMENT_TYPE(String code, String name) {
			this.code = code;
			this.name = name;
		}
	}

	/**
	 * 性别
	 */
	public enum SEX_TYPE {
		Male("1061", "男")
		, Female("1062", "女");
		private String code;

		public String getCode() {
			return code;
		}

		private String name;

		public String getName() {
			return name;
		}

		SEX_TYPE(String code, String name) {
			this.code = code;
			this.name = name;
		}
	}

	/**
	 * 证件类型
	 */
	public enum IDENT_TYPE {
		IdCard("01", "身份证"),
		PassportCard("02", "护照"),
		MilitaryCard("06", "军官证"),
		OtherCard("08", "其他");
		private String code;

		public String getCode() {
			return code;
		}

		private String name;

		public String getName() {
			return name;
		}

		IDENT_TYPE(String code, String name) {
			this.code = code;
			this.name = name;
		}
	}
}
